import {
  GraphQLList,
  GraphQLObjectType,
  GraphQLSchema,
  GraphQLString,
  GraphQLInt,
  GraphQLFloat,
  GraphQLEnumType,
  GraphQLNonNull,
  GraphQLID
} from 'graphql';

export default new GraphQLObjectType({
  name: 'ChinaArea',
  description: '中国5级行政区域',
  fields: {
    id: {
      type: GraphQLInt,
      description: '_id'
    },
    parentId: {
      type: GraphQLInt,
      description: '父级ID'
    },
    level: {
      type: GraphQLInt,
      description: '层级'
    },
    areaCode: {
      type: GraphQLInt,
      description: '行政代码'
    },
    zipCode: {
      type: GraphQLInt,
      description: '邮政编码'
    },
    cityCode: {
      type: GraphQLInt,
      description: '区号'
    },
    name: {
      type: GraphQLString,
      description: '名称'
    },
    shortName: {
      type: GraphQLString,
      description: '简称'
    },
    mergeName: {
      type: GraphQLString,
      description: '组合名'
    },
    pinyin: {
      type: GraphQLString,
      description: '拼音'
    },
    lng: {
      type: GraphQLFloat,
      description: '经度'
    },
    lat: {
      type: GraphQLFloat,
      description: '纬度'
    }
  }
})
